[MODORDERS-1311] Prevent unopening of order when related piece has a request#1252
Merged
damien-git merged 2 commits intomasterfrom Mar 3, 2026
Merged
[MODORDERS-1311] Prevent unopening of order when related piece has a request#1252damien-git merged 2 commits intomasterfrom
damien-git merged 2 commits intomasterfrom
Conversation
|
SerhiiNosko
reviewed
Mar 3, 2026
src/main/java/org/folio/service/orders/flows/update/unopen/UnOpenCompositeOrderManager.java
Show resolved
Hide resolved
SerhiiNosko
reviewed
Mar 3, 2026
| HashMap<String, List<String>> tenantIdToPoLineIds = new HashMap<>(); | ||
| poLines.forEach(poLine -> { | ||
| List<String> tenantIds = PoLineCommonUtil.getTenantsFromLocations(poLine); | ||
| tenantIds.forEach(tenantId -> { |
Contributor
There was a problem hiding this comment.
will this logic check requests from standalone non ecs tenants like diku? Location object will not have standalone tenants, so we should check them from request headers
Contributor
Author
There was a problem hiding this comment.
Yes, with a null tenantId.
SerhiiNosko
reviewed
Mar 3, 2026
| return processPoLines(compPO.getPoLines(), poLine -> processInventory(poLine, true, requestContext)); | ||
| } | ||
|
|
||
| public Future<Void> checkRequests(CompositePurchaseOrder compPO, RequestContext requestContext) { |
Contributor
There was a problem hiding this comment.
karate test can be written for non-ecs setup, for standalone tenants.
But in future we should improve running karate tests locally for the ECS, we have stories for it.
SerhiiNosko
approved these changes
Mar 3, 2026
src/main/java/org/folio/service/orders/flows/update/unopen/UnOpenCompositeOrderManager.java
Show resolved
Hide resolved
BKadirkhodjaev
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
MODORDERS-1311 - Prevent unopening of order when related piece has a request
Approach
OrderValidationServicetoPurchaseOrderHelper(processing is not validation)The logic is changed is subtle ways, the existence of requests is checked in more cases than before.
Disclaimer: I tested mod-orders and cross-module integration tests, but I was not able to run ECS tests. Also I was not able to test adding a request with the local dev environment UI, or check inventory.
Pre-Review Checklist